<!doctype html>
<html lang="{$app->language}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$app->charset}" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset={$app->charset}" />
<meta name="csrf-param" content="{$app->request->csrfParam}">
<meta name="csrf-token" content="{$app->request->csrfToken}">
<!--remove underline for edge-->
<meta name="format-detection" content="telephone=no">
<meta name="author" content="ShopWind" />
<meta name="generator" content="ShopWind" />
<meta name="copyright" content="ShopWind Inc. All Rights Reserved" />

<title>{$page.title}</title>
<meta name="Keywords" content="{$page.keywords}" />
<meta name="Description" content="{$page.description}" />

<link rel="shortcut icon" href="#"/>
<link type="text/css" href="{res file='css/header.css'}" rel="stylesheet" />
<link type="text/css" href="{res file='css/main.css'}" rel="stylesheet" />
<link type="text/css" href="{res file='css/footer.css'}" rel="stylesheet" />

<script type="text/javascript">
var HOME_URL = "{$homeUrl}";
var SITE_URL = "{$siteUrl}";
var PRICE_FORMAT = "{$priceFormat}";
var ENABLE_PRETTY = "{$enablePretty}";
</script>
<script type="text/javascript" src='{url route="{$app->controller->id}/jslang"}' charset="{$app->charset}"></script>
<script type="text/javascript" src="{lib file='jquery-1.11.1.js'}" charset="{$app->charset}"></script>
{$_head_tags|default}
<!--<editmode></editmode>-->
</head>
<body id="page-layout-{$app->controller->id|default:'default'}-{$app->controller->action->id|default:'index'}">
<!--{if $index}-->
<div class="top-ads" area="top-ads" widget_type="area">
	{widgets page='index' area='top-ads'}
</div>
<!--{/if}-->
<div id="site-nav" class="w-full">
   <div class="shoptop w clearfix">
      <div class="login_info">
         {$lang.hello},
         {if !$visitor.userid}
         {$visitor.username}
         <a href="{url route='user/login' redirect=$redirect}">{$lang.login}</a>
         <a href="{url route='user/register' redirect=$redirect}">{$lang.register}</a>
         {else}
         <a href="{url route='user/index'}"><span>{$visitor.username|escape}</span></a>
         <a href="{url route='user/logout'}">{$lang.logout}</a>
         {/if}
      </div>
      <ul class="quick-menu J_GlobalPop">
        {if !$index}<li class="home"><a href="{$siteUrl}">{$lang.back_home}</a></li>{/if}
        <li class="item">
           <div class="menu iwantbuy">
              <a class="menu-hd" href="{url route='category/index'}">我要买<b></b></a>
              <div class="menu-bd J_GlobalPopSub">
                 <div class="menu-bd-panel">
                    <div>
                       <p><a href="{url route='category/index'}">{$lang.gcategory}</a></p>
                       <p><a href="{url route='search/index' order='sales|desc'}">大家都喜欢</a></p>
					   <p><a href="{url route='search/index' order='g.add_time|desc'}">最新上架</a></p>
                    </div>
                 </div>
              </div>
           </div>
         </li>
         <li class="item">
            <div class="menu mytb">
               <a class="menu-hd" href="{url route='buyer/index'}">我是买家<b></b></a>
               <div class="menu-bd J_GlobalPopSub">
                  <div class="menu-bd-panel">
                     <div>
                        <p><a href="{url route='buyer_order/index'}">已买到的宝贝</a></p>
                        <p><a href="{url route='friend/index'}">我的好友</a></p>
                        <p><a href="{url route='my_question/index'}">我的咨询</a></p>
                     </div>
                  </div>
               </div>
            </div>
         </li>
         <li class="item">
            <div class="menu seller-center">
               <a class="menu-hd" href="{url route='seller/index'}">我是卖家<b></b></a>
               <div class="menu-bd J_GlobalPopSub">
                  <div class="menu-bd-panel">
                     <div>
                        <p><a href="{url route='seller_order/index'}">已卖出的宝贝</a></p>
                        <p><a href="{url route='my_goods/index'}">出售中的宝贝</a></p>
                     </div>
                  </div>
               </div>
            </div>
         </li>
         <li class="item">
            <div class="menu sites">
               <a class="menu-hd" href="javascript:;">用户中心<b></b></a>
               <div class="menu-bd J_GlobalPopSub">
                  <div class="cart-list  eject-box">
				<div class="login-status"> 你好，{if !$visitor.userid}请 <a href="{url route='user/login'}">登录</a>{else}<a href="{url route='user/index'}">{$visitor.username|escape}</a><a href="{url route='user/logout'}" class="ml5">[{$lang.logout}]</a>{/if}
				</div>
				<div class="member-nav-list">
					<ul class="ls">
						<li><a href="{url route='buyer_order/index'}" target="_blank">我的订单</a></li>
						<li><a href="{url route='my_question/index'}" target="_blank">咨询回复</a></li>
						<li><a href="{url route='my_coupon/index'}" target="_blank">优惠券</a></li>
					</ul>
					<ul class="ls">
						<li><a href="{url route='friend/index'}" target="_blank">我的好友</a></li>
						<li><a href="{url route='my_favorite/index'}" target="_blank">我的关注</a></li>
						<li><a href="{url route='user/password'}" target="_blank">修改密码</a></li>
						<li><a href="{url route='find_password/index'}" target="_blank">找回密码</a></li>
					</ul>
				</div>
				<div class="view-list"> 
					<!--{if isset($g_history)}-->
					<p>我浏览过的商品：</p>
					<ul class="clearfix w-full mt5">
						<!--{foreach from=$g_history item=h name=fe_h}-->
						<li class="float-left"> <a class="border block" href="url app=goods&id=$h.goods_id}"><img src="{$h.default_image|url_format}" alt="{$h.goods_name}" title="{$h.goods_name|escape}"  width="50" height="50"/></a> </li>
						<!--{/foreach}-->
					</ul>
					<!--{else}-->
					<div class="w-full center">暂时没有浏的商品览记录</div>
					<!--{/if}--> 
				</div>
			</div>
               </div>
            </div>
        </li>
         <li class="item">
            <div class="menu favorite">
               <a class="menu-hd" href="{url route='my_favorite/index'}">收藏夹<b></b></a>
               <div class="menu-bd J_GlobalPopSub">
                  <div class="menu-bd-panel">
                     <div>
                       <p><a href="{url route='my_favorite/index'}">收藏的宝贝</a></p>
                       <p><a href="{url route='my_favorite/index' type='store'}">收藏的店铺</a></p>
                    </div>
                 </div>
               </div>
           </div>
         </li>
         <li class="item" style="background:none">
            <div class="menu sites">
               <a class="menu-hd" href="javascript:;">网站导航<b></b></a>
               <div class="menu-bd padding10 J_GlobalPopSub">
               	  <!--{if isset($navs.header)}-->
                  <!--{foreach from=$navs.header item=nav}-->
                  <a href="{$nav.link}" {if $nav.open_new} target="_blank" {/if}>{$nav.title|escape}</a>
                  <!--{/foreach}-->
                  <!--{/if}-->
               </div>
            </div>
        </li>
     </ul>
   </div>
</div>